package DesignPatterns.Command;

/**
 * @author: leiwenkang02@meituan.com
 * @date: 2018/11/18
 * @time: 10:59
 */
public class ConcretCommand implements Command {

    // 持有一个接受者Receiver的引用，绑定一个特定的操作
    Receiver receiver;

    public ConcretCommand(Receiver receiver) {
        this.receiver = receiver;
    }

    @Override
    public void execute() {
        receiver.action();
    }
}
